Skip to main content
Version: 2.x.x

FetchParamsType


import { FetchParamsType } from "@hyper-fetch/core"

Description

If the command endpoint parameters are not filled it will throw an error

Defined in command/command.types.ts:222

Preview

type FetchParamsType<EndpointType,HasParams> = ExtractRouteParams<EndpointType> extends NegativeTypes ? { params?: NegativeTypes } : true extends HasParams ? { params?: NegativeTypes } : { params: NonNullable<ExtractRouteParams<EndpointType>> };

Structure

ExtractRouteParams<EndpointType> extends NegativeTypes ? {
params: NegativeTypes;
} : (true extends HasParams ? {
params: NegativeTypes;
} : {
params: NonNullable<ExtractRouteParams<EndpointType>>;
})